/**
 * @program: HelpLuojia
 * @description: 地图基础操作controller
 * @author: PXM
 * @create: 2022-11-21 19:17
 **/
package com.whu.helpluojia.controller;

import com.whu.helpluojia.domain.HelpInformation;
import com.whu.helpluojia.service.MapService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
@RequestMapping("/map")
public class MapController {

    @Autowired
    MapService mapService;

    @GetMapping("/search")
    public List<HelpInformation> search(String type, String key, String date, Double x, Double y, Integer distance) throws InstantiationException, IllegalAccessException {

        return mapService.search(type,key,date,x,y,distance);
    }
}
